#include "ESP.h"
#include "DATA.h"

ESPINIT onenet = ESPINIT();
DT data = DT(0);

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  while (!Serial) {
    ;
  }
  Serial.println("start");
  onenet.init();
}

void loop() {
  // put your main code here, to run repeatedly:
  int len = data.createJson("hum",random(1,100));
  onenet.connect();
  delay(1000);
    Serial.println(data.jsonMsg);
  onenet.send(len,data.jsonMsg);
  delay(5000);
}
